package com.cxx.purchasecharge.core.model.persistence;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import com.cxx.purchasecharge.core.model.BaseModel;
import com.cxx.purchasecharge.core.model.MemorialDayCode;

/**
 * 纪念日
 * 
 * @author xiang
 * 
 */
@Entity
@Table (name = "pc_memorial_day")
public class MemorialDay extends BaseModel
{
    private static final long serialVersionUID = -4178161675543038785L;

    private long id;
    private long customerId;
    private long contactId;
    private MemorialDayType type;
    private MemorialDayCode dayCode = MemorialDayCode.GREGORIAN;
    private Date date;
    private String comment;
    
    public MemorialDay () {}

    @Id
    @GeneratedValue (strategy = GenerationType.AUTO)
    public long getId ()
    {
        return id;
    }

    public void setId (long id)
    {
        this.id = id;
    }

    @Column (nullable = false)
    public long getCustomerId ()
    {
        return customerId;
    }

    public void setCustomerId (long customerId)
    {
        this.customerId = customerId;
    }

    @Column (nullable = false)
    public long getContactId ()
    {
        return contactId;
    }

    public void setContactId (long contactId)
    {
        this.contactId = contactId;
    }

    @Column (nullable = false)
    public MemorialDayType getType ()
    {
        return type;
    }

    public void setType (MemorialDayType type)
    {
        this.type = type;
    }

    public MemorialDayCode getDayCode ()
    {
        return dayCode;
    }

    public void setDayCode (MemorialDayCode dayCode)
    {
        this.dayCode = dayCode;
    }

    @Column (nullable = false)
    public Date getDate ()
    {
        return date;
    }

    public void setDate (Date date)
    {
        this.date = date;
    }

    @Column (length = 1024)
    public String getComment ()
    {
        return comment;
    }

    public void setComment (String comment)
    {
        this.comment = comment;
    }
}
